﻿using System;
using System.Windows.Controls;
using System.Windows;

namespace WickedFlame.GenDock
{
    public abstract class Pane : ContentControl// System.Windows.Controls.Primitives.Selector//
    {
        public abstract void AddContent(ContentDocument content);

        public virtual DockingLayoutManager GetManager()
        {
            DependencyObject parent = LogicalTreeHelper.GetParent(this);

            while (parent != null &&
                (!(parent is DockingLayoutManager)))
                parent = LogicalTreeHelper.GetParent(parent);

            return parent as DockingLayoutManager;
        }
    }
}
